home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Information / WebSites / Imagine / arexx / dna.lzx / makeDNA.irx < prev   
Text File  |  1992-02-03  |  871b  |  35 lines

  1. /*
  2.   Imagine V5+ AREXX script:
  3.     makeDNA.irx - Copyright Ash R. J. Wyllie
  4.  
  5.   Example script demonstrates parsing an ASCII text file, and using
  6.   the data contained within to create an object.
  7.  
  8.   The example data file creates a C180 fullerine and a short chain of DNA.
  9.   With additional programming, it should be possible to create larger
  10.   proteins.
  11.  
  12.   The AREXX script requires the object files "C", "H", "O", "N" and "P" to
  13.   be placed in "objects:molecules/". This can be changed by amending line 27
  14. */
  15.  
  16. address "Imagine_1"
  17.  
  18. say open(f1,"d_cg6.pdb","R")
  19.  
  20. do forever 
  21.         ln = readln(f1)
  22.         if eof(f1)
  23.                 then leave
  24.         parse var ln d1 d2 a1 d3 d4 x y z
  25.         a1=left(a1,1)
  26.         say d2 a1 x y z
  27.         loadobject "objects:molecules/" || a1
  28.         pick select
  29.         transform_position 100*x 100*y 100*z
  30. end
  31.  
  32. call close(f1)
  33.  
  34.         
  35.